package com.bookstore.entity;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Book {
    private String bookId;

    private String bookName;

    private String bookAnthou;

    private String download;

    private Double score;

    private Short downloadNumber;

    private String bookDetails;

    private Long uploadUser;

    private Long scoreNumber;

    private double totalScore;

    private Long typeId;

    private Date uploadDate;

    private String format;

    private String bookImg;

    private Category category;

    private User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId == null ? null : bookId.trim();
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName == null ? null : bookName.trim();
    }

    public String getBookAnthou() {
        return bookAnthou;
    }

    public void setBookAnthou(String bookAnthou) {
        this.bookAnthou = bookAnthou == null ? null : bookAnthou.trim();
    }

    public String getDownload() {
        return download;
    }

    public void setDownload(String download) {
        this.download = download == null ? null : download.trim();
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public Short getDownloadNumber() {
        return downloadNumber;
    }

    public void setDownloadNumber(Short downloadNumber) {
        this.downloadNumber = downloadNumber;
    }

    public String getBookDetails() {
        return bookDetails;
    }

    public void setBookDetails(String bookDetails) {
        this.bookDetails = bookDetails == null ? null : bookDetails.trim();
    }

    public Long getUploadUser() {
        return uploadUser;
    }

    public void setUploadUser(Long uploadUser) {
        this.uploadUser = uploadUser;
    }

    public Long getScoreNumber() {
        return scoreNumber;
    }

    public void setScoreNumber(Long scoreNumber) {
        this.scoreNumber = scoreNumber;
    }

    public double getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Double totalScore) {
        this.totalScore = totalScore;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getBookImg() {
        return bookImg;
    }

    public void setBookImg(String bookImg) {
        this.bookImg = bookImg;
    }

    public void setTotalScore(double totalScore) {
        this.totalScore = totalScore;
    }

    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format="yyyy-MM-dd")
    public Date getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(Date uploadDate) {
        this.uploadDate = uploadDate;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }
}